/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.Hijack.Giuliani;

import com.google.android.maps.GeoPoint;
import org.redpin.android.core.Measurement;

/**
 *
 * @author Philipp
 */
public class WayPoint extends GeoPoint implements Comparable<WayPoint>{
    
    private String description = "";
    public int id = -1;
    public Measurement measurement = null;
    public int floor = -1;
    
    public WayPoint(int lati, int longi){
        super(lati, longi);
    }
    
    public WayPoint(GeoPoint g){
        super(g.getLatitudeE6(), g.getLongitudeE6());
    }
    
    public void setDescription(String desc){
        description = desc;
    }
    
    public String getDescription(){
        return description;
    }
    
    
    @Override
    public String toString(){
        return description;
    }

    /**
     * needed to display the waypoints in the right order on the map
     * @param p
     * @return 
     */
    @Override
    public int compareTo(WayPoint p) {
        return p.getLatitudeE6()-getLatitudeE6();
    }
    
}
